package nio.channel;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.nio.channels.FileChannel;
import java.nio.file.StandardOpenOption;

public class Testchannel {
    public static void main(String[] args) throws IOException {

        testread();
    }
    /*
    channel 可自由读取文件内容
     */
    public static void testread() throws IOException {
        File file = new File("D:\\git\\commons-examples\\java-utils\\src\\main\\resources\\somefile.txt");
        FileChannel open = FileChannel.open(file.toPath(), StandardOpenOption.READ,StandardOpenOption.WRITE);
//        open.
    }
}
